import {isBoolean} from "@/uni_modules/uni-forms/components/uni-forms/utils";

const TokenKey = 'sgyjtn'
const UserKey = 'userId'
const OpenId = 'openId'
const ClientIp = 'Client-Ip'

export function getToken() {
    return uni.getStorageSync(TokenKey)
}

export function setToken(token) {
    return uni.setStorageSync(TokenKey, token)
}

export function removeToken() {
    return uni.removeStorageSync(TokenKey)
}
/* 校验是否登录 */
export function checkLogin() {
    if (getToken()) {
        return true;
    } else {
        return false;
    }
}


export {
    ClientIp,
    OpenId,
    TokenKey,
    UserKey,
}
